<template>
	<view class="counter">
		<view class="header">
			<view class="circle"></view>
			<view class="header_text"> xxxxx地面施工处理 </view>
		</view>

		<view class="card-container_top">
			<view class="card-container_countent">
				<view class="card-container_left"> 主材 </view>
				<view class="card-container_right">
					费用合计
					<view style="color: red"> ：¥{{baseData.mainQuoteMoney}} </view>
				</view>
			</view>
			<view class="card-container_line"> </view>
			<view class="card-container_countent">
				<view class="card-container_left"> 辅材 </view>
				<view class="card-container_right">
					费用合计
					<view style="color: red"> ：¥{{baseData.auxiliaryQuoteMoney}} </view>
				</view>
			</view>
			<view class="card-container_line"> </view>
			<view class="card-container_countent">
				<view class="card-container_left"> 人工 </view>
				<view class="card-container_right">
					费用合计<view style="color: red"> ：¥{{baseData.workerQuoteMoney}}</view>
				</view>
			</view>
		</view>

		<view class="standard_title"> 工艺标准描述111 </view>
		<view class="standard_countent">
			{{baseData.standardDesc}}
		</view>

		<view class="standard_title"> 优劣说明 </view>
		<view class="standard_countent">
			{{baseData.shortcomingDesc}}
		</view>

		<view class="standard_title"> 工艺标准图片 </view>
		<view class="pictute_countent">
			<image class="pictute_item" mode="aspectFit" v-for="item in baseData.picUrls?.split(',')||[]" :src="item">
			</image>
		</view>

		<view class="standard_title"> 工艺标准视频 </view>
		<view class="video_countent">
			<video class="video_item" v-for="item in baseData.videoUrls?.split(',')||[]" :src="item"></video>
		</view>
		<view style="height: 64rpx"> </view>
	</view>
</template>

<script setup>
	import {
		ref
	} from "vue";
	import {
		onLoad,
		onUnload
	} from "@dcloudio/uni-app";
	import circleTitle from "@/components/circle-title/index.vue";
	const baseData = ref({})
	onLoad((options) => {
		// 从路由参数获取动态标题
		const decodedData = JSON.parse(decodeURIComponent(options.data));
		const dynamicTitle = decodedData.spaceQuotatitle || "默认标题";
		uni.setNavigationBarTitle({
			title: dynamicTitle,
		});
		baseData.value = decodedData
		console.log(baseData.value);
	});

	onUnload(() => {
		uni.setStorage({
			key: 'yourKey',
			data: 'yourData',
			success: function() {
				console.log('数据已保存');
			}
		});
	})
</script>

<style lang="scss" scoped>
	@import "index";
</style>